<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        #app{
            width: 400px;
            height: 400px;
            background:pink;
            margin:50px auto;
            position: relative;
        }
        button{
            width: 50px;
            height: 25px;
        }
        .btnAtive{
            background: green;
            color: #fff;
        }
.container,.wrap{
   position: absolute;
   left: 0;
   bottom: 0;
   width: 400px;
   height: 300px;
}
img{
    display:block;
    width: 400px;
    height: 400px;
}
    </style>
</head>
<body>
    <div id="app">
        <button v-for="(item,index) in btn"  :class="activeIndex==index?'btnAtive':''"  @click="Toggle(index)">{{ item }}</button>
        <div class="container">
                <div class="wrap" v-for="(item,index) in imgArr"  v-show="activeIndex == index">
                    <img :src=imgArr[index]   alt="" >  
                </div>                                  
        </div>
    </div>
    <script src="/vue.js"></script>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                btn:["第一张","第二张","第三张"],
                imgArr:[
                   
                    "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2307228589,1892115804&fm=11&gp=0.jpg",
                    "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1274350153,911383344&fm=11&gp=0.jpg",
                    "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3727180135,1795523723&fm=11&gp=0.jpg"
                ],
                activeIndex:0
            },
            methods:{
                Toggle(index){
                this.activeIndex = index;
            }
            }
        })
    </script>
</body>
</html>